home *** CD-ROM | disk | FTP | other *** search
- unit Unit2;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, ComObj, StdVcl,
- CorbaObj, BobNotes_TLB;
-
- type
- TCorBobNotes = class(TCorbaImplementation, ICorBobNotes)
- private
- { Private declarations }
- public
- { Public declarations }
- protected
- procedure GetLines(const User, Password: WideString;
- out Lines: WideString); safecall;
- procedure SetLines(const User, Password, Lines: WideString); safecall;
- end;
-
- implementation
- uses
- CorbInit, IniMod, Unit1;
-
- procedure TCorBobNotes.GetLines(const User, Password: WideString;
- out Lines: WideString);
- var
- Notes: TStringList;
- begin
- Form1.Memo1.Lines.Add('---');
- Form1.Memo1.Lines.Add('Call to GetLines:');
- Form1.Memo1.Lines.Add(' User = ['+User+']');
- Form1.Memo1.Lines.Add(' Password = ['+Password+']');
- Notes := TStringList.Create;
- try
- IniMod.GetLines(User, Password, Notes);
- Lines := Notes.Text;
- finally
- Notes.Free
- end;
- Form1.Memo1.Lines.Add(' Lines = ['+Lines+']')
- end;
-
- procedure TCorBobNotes.SetLines(const User, Password, Lines: WideString);
- var
- Notes: TStringList;
- begin
- Form1.Memo1.Lines.Add('---');
- Form1.Memo1.Lines.Add('Call to SetLines:');
- Form1.Memo1.Lines.Add(' User = ['+User+']');
- Form1.Memo1.Lines.Add(' Password = ['+Password+']');
- Notes := TStringList.Create;
- try
- Notes.Text := Lines;
- IniMod.SetLines(User, Password, Notes);
- finally
- Notes.Free
- end;
- Form1.Memo1.Lines.Add(' Lines = ['+Lines+']')
- end;
-
- initialization
- TCorbaObjectFactory.Create('CorBobNotesFactory', 'CorBobNotes', 'IDL:BobNotes/CorBobNotesFactory:1.0', ICorBobNotes,
- TCorBobNotes, iMultiInstance, tmSingleThread);
- end.
-